# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pyfiglet
_pkgname=pyfiglet
pkgver=0.8.post1
pkgrel=1
pkgdesc='Pure-python FIGlet implementation.'
arch=('any')
url='https://pypi.python.org/pypi/pyfiglet/'
license=('GPL2')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('3b8c7b4c9ae48466da3ccc6711aac9c35b08a373abbdda66c60a62f17ba6edd316b0d5e3085613f7c44fbaa2f02acc4a5b3830a31d22437d9261863878421400')

build() {
  cd "pyfiglet-$pkgver"

  python2 setup.py build
}

package() {
  cd "pyfiglet-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
    --skip-build

  mv "$pkgdir/usr/bin/pyfiglet" "$pkgdir/usr/bin/pyfiglet2"
}

